<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Images
 *
 * @property int $id 图片的标识
 * @property int $file_id 文件标识
 * @property string|null $img_name 图片名
 * @property string|null $img_type 图片类型
 * @property int $file_100px_id 文件100px标识
 * @property int $file_300px_id 文件300px标识
 * @property int $file_1000px_id 文件1000px标识
 * @property string|null $deleted_at
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property-read \App\Files $file1000px
 * @property-read \App\Files $file100px
 * @property-read \App\Files $file300px
 * @property-read \App\Files $files
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Query\Builder|\App\Images onlyTrashed()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereFile1000pxId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereFile100pxId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereFile300pxId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereFileId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereImgName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereImgType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Images whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\Images withoutTrashed()
 * @mixin \Eloquent
 */
class Images extends Model
{
    protected $table = 'images';
    use SoftDeletes;

    public function files(){
        return $this->belongsTo('App\Files','file_id');
    }

    public function file1000px()
    {
        return $this->belongsTo('App\Files', 'file_1000px_id');
    }

    public function file300px()
    {
        return $this->belongsTo('App\Files', 'file_300px_id');
    }

    public function file100px()
    {
        return $this->belongsTo('App\Files', 'file_100px_id');
    }
}